package com.yc.cloud.clouduser.rpc;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.ProtocolSignature;
import org.apache.hadoop.ipc.RPC;

import java.io.IOException;

public class ClientProtocolImpl implements ClientProtocol{
    @Override
    public String echo(String msg) {
        return "hello "+msg;
    }

    @Override
    public int add(int v1, int v2) throws IOException {
        return v1+v2;
    }

    @Override
    public long getProtocolVersion(String s, long l) throws IOException {
        return versionID;
    }

    public static void main(String[] args) {
        final RPC.Builder server=new RPC.Builder(new Configuration());

    }

    @Override
    public ProtocolSignature getProtocolSignature(String s, long l, int i) throws IOException {
        return null;
    }
}
